<%@page import="java.util.List"%>
<%@page import="classes.user"%>
<%@page import="classes.AdminDB"%>
<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*" errorPage="error.jsp" %>
<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Shopping cart</title>


        <link href="shopStyles.css" rel="stylesheet" type="text/css"> <!-- guardamos el css en la raiz porque sino hay cosas que no funcionan -->
        <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css">
        <link rel="stylesheet" type="text/css" href="css/style2.css" />



        <!-- Coloca esta petición de presentación donde creas oportuno. -->
        <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script><script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
        <script type="text/javascript">
            (function() {
                var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                po.src = 'https://apis.google.com/js/plusone.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
            })();
        </script>


        <script language="javascript" type="text/javascript" src="js/jquery.js"></script>
        <script language="javascript" type="text/javascript" src="js/jquery.easing.js"></script>
        <script language="javascript" type="text/javascript" src="js/script.js"></script>


        <!-- Pop out logout-->
        <script language="JavaScript">
            function Abrir_ventana (pagina) {
                var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=508, height=200, top=85, left=140";
                window.open(pagina,"",opciones);
            }
        </script>


        <!-- view shopping cart -->
        <script language=javascript>
            function comprobarTexto(texto)
            {
                if(texto != "")
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            
            function comprobarEmail(email)
            {
                var patron = new RegExp("^\\w+@\\w+\\.\\w{2,3}$");
                if(email != ""){
                    return (patron.test(email));
                }
                else{
                    return false;
                }
            }
    
            
    
    
    
            function validarRegistro(){
                with(document.checkout){
                    //Comprobar datos
                    if(!comprobarTexto(name.value)){
                        alert("Name is empty");
                        name.focus();
                    }
                    else if(!comprobarTexto(lastname.value)){
                        alert("Lastname is empty");
                        name.focus();
                    }
                    else if(!comprobarEmail(email.value)){
                        alert("WRONG Email!");
                        email.select();
                        email.focus();
                
                    }
                    else if(!comprobarTexto(country.value)){
                        alert("Country is empty");
                        country.focus();
                    }
                    else if(!comprobarTexto(city.value)){
                        alert("City is empty");
                        city.focus();
                    }
                    else if(!comprobarTexto(street.value)){
                        alert("Street is empty");
                        street.focus();
                    }
                    else if(!comprobarTexto(number.value)){
                        alert("Number is empty");
                        number.focus();
                    }
                    else if(!comprobarTexto(floor.value)){
                        alert("Floor is empty");
                        floor.focus();
                    }
                    else if(!comprobarTexto(letter.value)){
                        alert("Letter is empty");
                        letter.focus();
                    }
                    else if(!comprobarTexto(product.value)){
                        alert("Confirm your address please!");
                        product.focus();
                    }
                    else{
                        submit();
                    }
                    
                }
            }
        
            function setcookie (name,value,expires,path,domain,secure) {
                document.cookie = name + "=" + escape (value) +
                    ((expires) ? "; expires=" + expires.toGMTString() : "") +
                    ((path) ? "; path=" + path : "") +
                    ((domain) ? "; domain=" + domain : "") +
                    ((secure) ? "; secure" : "");
            }

            function getcookieval (offset) {
                var endstr = document.cookie.indexOf (";", offset);
                if (endstr == -1)
                    endstr = document.cookie.length;
                return unescape(document.cookie.substring(offset, endstr));
            }

            function getcookie (name) {
                var arg = name + "=";
                var alen = arg.length;
                var clen = document.cookie.length;
                var i = 0;
                while (i < clen)
                {
                    var j = i + alen;
                    if (document.cookie.substring(i, j) == arg) return getcookieval (j);
                    i = document.cookie.indexOf(" ", i) + 1;
                    if (i == 0) break;
                }
                return null;
            }
            /* Manejo del dinero*/
            function money(input) {
                var euros = Math.floor(input)
                var tmp = new String(input)
                for (var decimalAt = 0; decimalAt < tmp.length; decimalAt++) {
                    if (tmp.charAt(decimalAt)==".")
                        break;
                }
                var centimos  = "" + Math.round(input * 100)
                centimos = centimos.substring(centimos.length-2, centimos.length)
                euros += ((tmp.charAt(decimalAt+2)=="9")&&(centimos=="00"))? 1 : 0;

                return euros + "." + centimos
            }

            /*quitar items del carrito*/
            function remove(RemOrder) {
                if (confirm("This product will be removed! Sure?")) {
                    numerodeorden = getcookie("order");
                    for(i=RemOrder; i < numerodeorden; i++) {
                        nuevopedido1 = "Order." + (i+1);
                        nuevopedido2 = "Order." + (i);
                        datos = getcookie(nuevopedido1);
                        setcookie (nuevopedido2, datos, null, "/");
                    }
                    nuevopedido = "Order." + numerodeorden;
                    setcookie ("order", numerodeorden-1, null, "/");
                    deletecookie(nuevopedido,"/");
                    location.href=location.href;
                }
            }

            function viewcart() {
                numerodeorden = 0;
                subtotal=0;
                preciototal=0;
                numerodeorden = getcookie("order");
                tablas = "";
                for (i = 1; i <= numerodeorden; i++) {
                    nuevopedido = "Order." + i;
                    datos = "";
                    datos = getcookie(nuevopedido);
                    ficha0 = datos.indexOf("|", 0);
                    ficha1 = datos.indexOf("|", ficha0+1);
                    ficha2 = datos.indexOf("|", ficha1+1);
                    campos = new Array;
                    campos[0] = datos.substring( 0, ficha0 );
                    campos[1] = datos.substring( ficha0+1, ficha1 );
                    campos[2] = datos.substring( ficha1+1, ficha2 );
                    campos[3] = datos.substring( ficha2+1, datos.length );
                    subtotal = subtotal + (campos[1] * campos[0]);
                    preciototal = money(subtotal);
                    tablas += "<tr style='font: 9pt; text-align: justify; color=white;'><td>" + campos[2] + "</td><td  style='color=navy'>"
                        + campos[3] + "</td><td>" + campos[1]
                        + " €</td><td><input type=text id='inputcarro' size=2 name=\"Cantidad"+ i +"\" value=\""
                        + campos[0] + "\"></td>"
		
		
                        + "<td>"
      
	  
                        + "<input type=hidden name=\"Referencia"+ i +"\" value=\"" + campos[2] + "\">"
                        + "<input type=hidden name=\"Producto"+ i +"\" value=\"" + campos[3] + "\">"
                        + "<input type=hidden name=\"Euros"+ i +"\" value=\"" + campos[1] + "\">";
                }
                document.write(tablas);
                document.write("</td></tr><tr><td  colspan=2 style='font: 9pt'> TOTAL: </td><td style='color:white'>");
                document.write(preciototal + " €");
            }


 
            function recuperarnombreproducto(){ 
                var fecha = new Date();
 
                
                nombre= campos[3];
                qty = campos[0]; 
                precio = preciototal;

                checkout.date.value=fecha;
                checkout.product.value=nombre; 
                checkout.qty.value=qty; 
                checkout.precio.value=precio; 
            } 



            function deletecookie(name, path, domain) {
                if (getcookie(name)) {
                    document.cookie = name + "=" + 
                        ((path) ? "; path=" + path : "") +
                        ((domain) ? "; domain=" + domain : "") +
                        "; expires=Thu, 01-Jan-70 00:00:01 GMT";
                }
            }

            function emptyornot()
            {
                if (preciototal > 0)
                {
                    alert("Next step: Choose payment method! Almost done!");
                    location.href = "paymentmethod.jsp";
                }
                else
                {
                    alert("Emmmm...your cart is empty...")	
                }
            }


            function about()
            {
                alert("Aplicacion realizada por:\nAlvaro Garcia Ojea\n5º Ingenieria informatica.\n\nEmail: alvarogarcia9@gmail.com");
            }



        </script>


        <style>

            ul.lof-main-wapper li {
                position:relative;	
            }
        </style>
        <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
    </head>

    <body>


        <div id="fb-root"></div>
        <script>(function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/es_ES/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>

        <div class="container">
            <div class="header">

                <%@ page language="java" %>
                <%
                    String cookieName2 = "order";
                    Cookie cookies2[] = request.getCookies();
                    Cookie order = null;


                    if (cookies2 != null) {
                        for (int i = 0; i < cookies2.length; i++) {
                            if (cookies2[i].getName().equals(cookieName2)) {
                                order = cookies2[i];
                                //System.out.println("Numero de orders = " + order.getValue());
                                if (order.getValue().equals("0")) {
                                    System.out.println("Hemos entrado en el IF por que no hay ningun item");

                                    response.sendRedirect("Scart.jsp");

                                    break;
                                }
                            }
                        }
                    }
                %> 
                <table width="100%" border="0">
                    <tr>
                        <td><img src="images/logoshop2.png" width="410" height="165" alt="shop"></td>
                        <td align="right"><img src="images/flag copia.png" width="149" height="123" alt="yourf1store">
                            <!-- Boton me gusta de facebook -->
                            <div class="fb-like" data-send="true" data-layout="button_count" data-width="100" data-show-faces="true"></div>

                            <%-- IDENTIFIACION DE USUARIO CON SESIONES O COOKIES --%>

                            <%@ page language="java" %>
                            <%
                                String cookieName = "email";
                                Cookie cookies[] = request.getCookies();
                                Cookie email = null;
                                if (cookies != null) {
                                    for (int i = 0; i < cookies.length; i++) {
                                        System.out.println("email= " + cookieName + " cookies[i]:" + cookies[i].getName());
                                        if (cookies[i].getName().equals(cookieName)) {
                                            email = cookies[i];
                                            break;
                                        }
                                    }
                                }
                                //Creamos una cookie para un usuario no registrado
                                if (email == null) {
                                    Cookie cookie = new Cookie("email", "F1Guest");
                                    cookie.setMaxAge(-1);
                                    response.addCookie(cookie);
                                    email = cookie;
                                    System.out.println("Usuario desconocido! En checkout.jsp le damos "
                                            + "la cookie: "+email.getName()+" que tiene el valor: "+email.getValue());

                                }
                                //System.out.println("Valor de la cookie email en checkout.jsp: "+email.getValue());
%>      


                            <!-- SiteSearch Google -->
                            <FORM method="get" action="http://www.google.com/search">
                                <input type=hidden name=ie value=UTF-8>
                                <input type=hidden name=oe value=UTF-8>
                                <TABLE bgcolor="#F27405" class="borderSearchRightDown"><tr>
                                        <td class="borderSearchRightDown">
                                            <INPUT TYPE="search" name="q" size="31" maxlength="255" value="" placeholder="Search something you want...">
                                            <INPUT type="submit" name="btnG" VALUE="Buscar en sitio">
                                            <font size=-1>
                                            <input type="hidden" name="domains" value="index.jsp"><br><input type="radio" name="sitesearch" value=""> 
                                            <span class="fontSpecial">WWW</span>
                                            <input type="radio" name="sitesearch" value="index.jsp" checked>
                                            <span class="fontSpecial">F1 store</span><br>
                                            </font>

                                        </td></tr></TABLE>
                                <div align="right">
                                    <!-- Reconocimiento de usuario -->


                                    <label><strong><%if (email != null) {%><%=email.getValue()%></strong> | <a href="javascript:Abrir_ventana('logout_popup.jsp')"><font size="1" face="Verdana">logout</font></a> </label>
                                    <label> | <a href="options.jsp"><font size="1" face="Verdana">options</font></a></label> 
                                            <%} else {

                                            %>
                                    <label><strong> Unknown user |</strong></label> <a href="login.jsp">Login</a>
                                    <%}%>

                                    <!-- Fin reconocimiento del usuario -->




                                    <img src="images/eng.gif" width="20" height="15" alt="eng">   
                                    <img src="images/esp.gif" width="20" height="15" alt="esp"> 
                                    <img src="images/fra.gif" width="20" height="15" alt="fra"> 
                                    <img src="images/ger.gif" width="20" height="15"> 
                                    <img src="images/por.gif" width="20" height="15" alt="por"> 
                                    <a href="#final" class="fontSpecialLanguageChooser"><font size="1" face="Verdana">Choose language</font></a></div>

                            </FORM>
                    </tr>
                </table>

            </div>
        </div>

        <div class="container">
            <div class="header">
                <ul class="menu">    
                    <li><a href="index.jsp"><span>Home</span></a></li>
                    <% if (email == null) {
                    %>

                    <li><a href="login.jsp"><span>Login</span></a></li>
                    <li><a href="signup.jsp"><span>Signup</span></a></li>

                    <%} else {%>
                    <li><a href="logout_popup.jsp"><span>Logout</span></a></li>
                    <%}%>    
                    <li onClick="about()"><a href="#"><span>About</span></a></li>
                    <li><a href="contact.jsp"><span>Contact</span></a></li>
                    <li><a href="cars.jsp"><span>Cars</span></a></li>
                    <li><a href="/Apparel"><span>Apparel</span></a></li>
                    <li><a href="gadgets.jsp"><span>Gadgets</span></a></li>
                    <li><a href="/CarAccessories"><span>Car Accesories</span></a></li>
                    <li><a href="search.jsp"><span>Search</span></a></li>
                    <li><a href="Scart.jsp" class="active"><span>Cart</span></a></li>

                </ul>

            </div>
        </div>

        <div class="container">
            <div class="content">







            </div>
            <table width="100%" height="226" border="0">
                <tr>
                    <td width="14%" align="center" valign="top" class="fontSpecial"><div align="left">
                            <p>&nbsp;</p>
                            <p>Categories  | <a href="allproducts.jsp">All products</a></p>
                            <ul id="MenuBar1" class="MenuBarVertical">
                                <li><a class="MenuBarItemSubmenu" href="cars.jsp">Cars</a>
                                    <ul>
                                        <li><a href="ferrari.jsp">Ferrari</a></li>
                                        <li><a href="redbull.jsp">Red Bull Racing</a></li>
                                        <li><a href="mcclaren.jsp">McClaren-Mercedes</a></li>
                                        <li><a href="mercedes.jsp">Mercedes</a></li>
                                        <li><a href="williams.jsp">Williams-Cosworth</a></li>
                                        <li><a href="tororosso.jsp">Toro Rosso</a></li>
                                        <li><a href="renault.jsp">Renault</a></li>
                                        <li><a href="forceindia.jsp">Force India-Mercedes</a></li>
                                        <li><a href="sauber.jsp">Sauber</a></li>
                                        <li><a href="lotus.jsp">Lotus-Renault</a></li>
                                        <li><a href="hispania.jsp">Hispania RT</a></li>
                                        <li><a href="virgin.jsp">Virgin</a></li>
                                    </ul>
                                </li>
                                <li><a href="#" class="MenuBarItemSubmenu">Apparel</a>
                                    <ul>
                                        <li><a href="shirts.jsp">Shirts</a></li>
                                        <li><a href="jackets.jsp">Jackets</a></li>
                                        <li><a href="pants.jsp">Pants</a></li>
                                        <li><a href="underware.jsp">Underware</a></li>
                                        <li><a href="sneakers.jsp">Sneakers</a></li>
                                    </ul>
                                </li>
                                <li><a href="gadgets.jsp">Gadgets</a>	          </li>
                                <li><a href="#" class="MenuBarItemSubmenu">Car accessories</a>
                                    <ul>
                                        <li><a href="lights.jsp">Lights</a></li>
                                        <li><a href="tyres.jsp">Tyres</a></li>
                                        <li><a href="wheel.jsp">Steering wheel</a></li>
                                        <li><a href="others.jsp">Other pieces</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>



                        <p><img src="images/makemonet.png" width="108" height="212" alt="money">

                            <!-- Beginning of meebo me widget code.
                        Want to talk with visitors on your page?  
                        Go to http://www.meebome.com/ and get your widget! -->
                            <embed src="http://widget.meebo.com/mm.swf?BRqynkBnZM" type="application/x-shockwave-flash" width="150" height="300"></embed>
                        </p>
                        <p>&nbsp;</p>
                        <p>&nbsp; </p>
                        <p>&nbsp; </p>
                        <p>&nbsp; </p></td>
                    <td width="86%" align="right" valign="top" class="borderImagesRight">

                        <p>&nbsp;</p>
                        <h2 align="center">Shooping cart</h2>
                        <table width="750" align="center" cellpadding="5" cellspacing="1" bgcolor="#F27405" class="shoopingcart" style="font: 10pt Verdana, Geneva, Arial, Helvetica, sans-serif;">
                            <tbody>
                                <tr style="font: bold">
                                    <td width="50"><div align="center">Reference</div></td>
                                    <td width="160"><div align="center">Name</div></td>
                                    <td width="100"><div align="center">Amount</div></td>
                                    <td width="40"><div align="center">Qty</div></td>
                                    <td width="160"><div align="center"></div></td>
                                </tr>
                            <script language=JavaScript>
                            viewcart();
                            </script>
                            </tbody>
                        </table>
                        <p>&nbsp;</p>
                        <h2 align="left">Shipment information: </h2>
                        <p align="left">


                            <%AdminDB adb = new AdminDB();
                                user u = new user();
                                List<user> users;

                                String email2 = email.getValue();
                                String by = "email";

                                users = u.searchUsers(adb.getConnection(), email2, by);
                                System.out.println("Lo que hay en users es: " + users);
                                if (email.getValue().equals("F1Guest")) {%>
                        <div class="TabbedPanelsContentGroup">
                            <div class="TabbedPanelsContent">
                                <form name="checkout" method="post" action="/ShopOnline/newOrderShipment">
                                    <div align="center">

                                        <table width="60%" border="0">
                                            <tr>
                                                <td width="37%">Country</td>
                                                <td width="63%"><label for="country"></label>
                                                    <input type="text" name="country" id="country"></td>
                                            </tr>
                                            <tr>
                                                <td>City</td>
                                                <td><label for="city"></label>
                                                    <input type="text" name="city" id="city"></td>
                                            </tr>
                                            <tr>
                                                <td>Street</td>
                                                <td><label for="street"></label>
                                                    <input type="text" name="street" id="street"></td>
                                            </tr>
                                            <tr>
                                                <td>Number</td>
                                                <td><label for="number"></label>
                                                    <input type="text" name="number" id="number"></td>
                                            </tr>
                                            <tr>
                                                <td>Floor</td>
                                                <td><label for="floor"></label>
                                                    <input type="text" name="floor" id="floor"></td>
                                            </tr>
                                            <tr>
                                                <td>Letter</td>
                                                <td><input type="text" name="letter" id="letter"></td>
                                            </tr>
                                            <tr>
                                                <td>Name</td>
                                                <td><input type="text" name="name" id="name"></td>
                                            </tr>
                                            <tr>
                                                <td>Lastname</td>
                                                <td><input type="text" name="lastname" id="lastname"></td>
                                            </tr>
                                            <tr>
                                                <td>Email</td>
                                                <td><input type="text" name="email" id="email"></td>
                                            </tr>
                                            <tr>
                                                <td>Product</td> 
                                                <td><input name="product" type="text" class="inputProduct" id="product" readonly="readonly"></td>
                                            </tr>
                                            <tr>
                                                <td>Price</td> 
                                                <td><input name="precio" type="text" class="inputProduct" id="precio" readonly="readonly"></td>
                                            </tr>
                                            <tr>
                                                <td>Qty</td> 
                                                <td><input name="qty" type="text" class="inputProduct" id="qty" readonly="readonly"></td>
                                            </tr>
                                            <tr>
                                                <td>Date</td> 
                                                <td><input name="date" type="text" class="inputProduct" id="date" readonly="readonly"></td>
                                            </tr>
                                            <tr>
                                                <td>&nbsp;</td>
                                                <td><input type="button" name="button" id="button" value="Confirm address" onClick="recuperarnombreproducto()"></td>
                                            </tr>
                                        </table>
                                        <p>&nbsp;                        </p>
                                        <p>
                                            <input type="hidden" name="money" value="10000">
                                            <input type="button" name="ok" id="ok" value="Continue" onClick="validarRegistro()">
                                        </p>
                                        <p> After clicking in Confirm button your order will be confirmed.</p>
                                    </div>
                                </form>
                            </div>

                        </div>
                        <%} else {
                            if (users == null) {
                            } else {
                                for (user u1 : users) {%>
                        <div align="left">
                            <table>
                                <tr>
                                    <td>Name: <%=u1.getName()%></td>
                                </tr>
                                <tr>
                                    <td>Lastname: <%=u1.getSecondname()%></td>
                                </tr>
                                <tr>
                                    <td>Country: <%=u1.getCountry()%></td>
                                </tr>
                                <tr>
                                    <td>City: <%=u1.getCity()%></td>
                                </tr>
                                <tr>
                                    <td>Street: <%=u1.getStreet()%></td>
                                </tr>
                                <tr>
                                    <td>Number: <%=u1.getNumber()%></td>
                                </tr>
                                <tr>
                                    <td>Floor: <%=u1.getFloor()%></td>
                                </tr>
                                <tr>
                                    <td>Letter: <%=u1.getLetter()%></td>
                                </tr>
                            </table>





                        </div>
                        <p align="left">Fill the information if you want to ship to another place.<img src="images/shoplogo.png" width="27" height="23" alt="checkout"></p>
                        <table width="100%" border="0">
                            <tr>
                                <td width="37%"><img src="images/lorry.png" width="279" height="298" alt="logistic"></td>
                                <td width="63%"><div id="TabbedPanels1" class="TabbedPanels">
                                        <ul class="TabbedPanelsTabGroup">
                                            <li class="TabbedPanelsTab" tabindex="0">Shipment Information</li>
                                        </ul>
                                        <div class="TabbedPanelsContentGroup">
                                            <div class="TabbedPanelsContent">
                                                <form name="checkout" method="post" action="/ShopOnline/newOrderShipment">
                                                    <div align="center">

                                                        <table width="60%" border="0">
                                                            <tr>
                                                                <td width="37%">Country</td>
                                                                <td width="63%"><label for="country"></label>
                                                                    <input type="text" name="country" id="country" value="<%=u1.getCountry()%>"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>City</td>
                                                                <td><label for="city"></label>
                                                                    <input type="text" name="city" id="city" value="<%=u1.getCity()%>"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Street</td>
                                                                <td><label for="street"></label>
                                                                    <input type="text" name="street" id="street" value="<%=u1.getStreet()%>"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Number</td>
                                                                <td><label for="number"></label>
                                                                    <input type="text" name="number" id="number" value="<%=u1.getNumber()%>"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Floor</td>
                                                                <td><label for="floor"></label>
                                                                    <input type="text" name="floor" id="floor" value="<%=u1.getFloor()%>"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Letter</td>
                                                                <td><input type="text" name="letter" id="letter" value="<%=u1.getLetter()%>"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Name</td>
                                                                <td><input type="text" name="name" id="name" value="<%=u1.getName()%>"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Lastname</td>
                                                                <td><input type="text" name="lastname" id="lastname" value="<%=u1.getSecondname()%>"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Email</td>
                                                                <td><input type="text" name="email" id="email" value="<%=u1.getEmail()%>"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Product</td> 
                                                                <td><input name="product" type="text" class="inputProduct" id="product" readonly="readonly"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Price</td> 
                                                                <td><input name="precio" type="text" class="inputProduct" id="precio" readonly="readonly"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Qty</td> 
                                                                <td><input name="qty" type="text" class="inputProduct" id="qty" readonly="readonly"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Date</td> 
                                                                <td><input name="date" type="text" class="inputProduct" id="date" readonly="readonly"></td>
                                                            </tr>
                                                            <tr>
                                                                <td>&nbsp;</td>
                                                                <td><input type="button" name="button" id="button" value="Confirm address" onClick="recuperarnombreproducto()"></td>
                                                            </tr>
                                                        </table>
                                                        <p>&nbsp;                        </p>
                                                        <p>
                                                            <input type="hidden" name="money" value="<%=u1.getMoney()%>">
                                                            <input type="button" name="ok" id="validar" value="Continue" onClick="validarRegistro()">
                                                        </p>
                                                        <p> After clicking in Confirm button your order will be confirmed.</p>
                                                    </div>
                                                </form>
                                            </div>
                                            <%}
                                                    }
                                                }%>
                                        </div>
                                    </div></td>
                            </tr>
                        </table>
                        <p align="left">&nbsp;</p>
                        <p>&nbsp;</p></td>
                </tr>
            </table>
        </div>
    </div>



    <div class="container">
        <div class="footer">
            <h5 align="center" class="white">Alvaro F1 online shop - Your F1 store</h5>
            <a name="final"></a><!-- Marcador para ir al final de la pagina -->
            <div id="google_translate_element" align="center"></div>
            <div align="center">
                <script>
                function googleTranslateElementInit() {
                    new google.translate.TranslateElement({
                        pageLanguage: 'es'
                    }, 'google_translate_element');
                }
                </script>
                <script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
                <img src="images/footerShop.png" width="940" height="74" alt="footer"></div>
        </div>
    </div>

    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
</body>
</html>